#!/usr/bin/perl # for syntax highlighting
# CSS-V1

use gri_secmgr qw(get_cookie_value got_cookie);
use gri_database;
use Data::Dumper;
use MIME::Base64;

# Here we get the username and then work out the groups, and then
# work out the groups they are allowed to view...
#
# Then we get the list are work out the structure of them ...
# though for the first iteration we simply put them in a list!!!
#

use Data::Dumper;

sub mm_setup_init_roles {
my $do_setup=shift;

	if(!defined($do_setup) || $do_setup =~ /not defined/ || $do_setup == 0 ) {
		return "";
	}
	# We need to check that no actual roles are defined, if they are
	# then we do not want to see this.
	my $info=$::GRI_FRONTEND->get_role_count();
	if(defined($info->{error})) {
		return '<br><div style="position: relative; top: 20px; width: 600px; margin: auto; background-color: red; color: white;"><br><div style="text-align: center;">Error: ' . $info->{error} . '<br>&nbsp;</div></div>';
	}
	if($info->{count}) {
		return "";
	}
	my $l=link_to_str("stdlink","Setup","site_primary_role","");
	return '<br><div style="position: relative; top: 20px; width: 600px; margin: auto; background-color: red; color: white;"><br><div style="text-align: center;">No site administrator has yet been defined. Click ' . $l . ' for you to be that person.<br>&nbsp;</div></div>';
}

# vim: ts=4:sw=4
